<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <title>Swanky by Free CSS Templates</title>
            <meta name="keywords" content="">
                <meta name="description" content="">
                    <link href="style.css" rel="stylesheet" type="text/css" media="screen">
                        <link type="text/css" rel="stylesheet" href="tsc_pagination.css">
                            </head>
                            <body>                        
                                <?php require_once './header.php'; ?>
                                <hr>                                   
                                    <div id="page">
                                        <?php
                                        require_once './database/connection.php';
                                        require_once './database/search.php';
                                        $obj = new search_data();
                                        ?>
                                        <div id="content">
                                            <form method="post" action="content_search.php">
                                                <input type="text" name="Search">
                                                    <input type="submit" name="ok" value="Search">
                                                        </form>
                                                        <?php
                                                        if (isset($_POST['ok'])) {
                                                            $data = $obj->timkiem($_POST['Search']);
                                                            foreach ($data as $dulieu) {
                                                                echo '<div class="post"><h1 class="title"><a href="content_search.php?view=' . $dulieu['id'] . '">' . $dulieu['title'] . '</a></h1><p class="meta"><small>' . date('d-m-y') . ' ' . '<a href="#">TrungHieu</a></small></p><div class="entry"><p>' . $dulieu['overview'] . '</p></div>';
                                                            }
                                                            if (empty($data)) {
                                                                echo 'Không có bài viết nào như vậy';
                                                            }
                                                        }
                                                        ?>
                                        </div>
                                    </div>
                                ?>
                                        <div style="clear: both;">&nbsp;</div>
                                        </div>

                                        <hr>


                            </body>
</html>

